import instance from '@/utils/request'

// Array<Verificationcode>
// 控制响应数据的类型

// 后台查询全局登录日志
export let infodata = () => {
    return instance({
        url: "/api/longinfo",
        method: "get",
    })
}

// 查询用户信息
export let toudata = () => {
    return instance({
        url: `/api/chause`,
        method: "get",
    })
}

// 修改(个人/用户)信息
export let updatauser = (data: any) => {
    return instance({
        url: `/api/updateuser`,
        method: "post",
        data
    })
}

// 查询所有用户信息
export let alluserdata = (data?: any) => {
    return instance({
        url: `/api/cha`,
        method: "get",
        params: data
    })
}
// 删除(个人/用户)信息
export let deluser = (data: any) => {
    return instance({
        url: `/api/deluser`,
        method: "post",
        data
    })
}
// 注册(个人/用户)信息
export let adduser = (data: any) => {
    return instance({
        url: `/api/adduser1`,
        method: "post",
        data
    })
}
// 创建投票
export let additem = (data: any) => {
    return instance({
        url: `/api/chuangdata`,
        method: "post",
        data
    })
}
// 后台all投票信息
export let itemdata = (data: any) => {
    return instance({
        url: "/api/itemdata",
        method: "get",
        params: data
    })
}
// 删除投票信息
export let delitem = (data: any) => {
    return instance({
        url: `/api/delitem`,
        method: "post",
        data
    })
}
// 已参加投票信息
export let canitem = (data: any) => {
    return instance({
        url: "/api/canitemdata",
        method: "get",
        params: data
    })
}
// 获取投票信息
export let xuanitem = (data: any) => {
    return instance({
        url: "/api/getuseitem",
        method: "get",
        params: data
    })
}
// 参与投票
export let useitem = (data: any) => {
    return instance({
        url: "/api/useitem",
        method: "post",
        data
    })
}
// 修改投票
export let upitem = (data: any) => {
    return instance({
        url: "/api/upitem",
        method: "post",
        data
    })
}
// 反馈创建
export let addfk = (data: any) => {
    return instance({
        url: "/api/addfk",
        method: "post",
        data
    })
}
// 反馈评论
export let fkhf = (data: any) => {
    return instance({
        url: "/api/addfkhf",
        method: "post",
        data
    })
}
// 获取反馈信息
export let fkdata = () => {
    return instance({
        url: "/api/fkdata",
        method: "get",
    })
}
// 获取反馈评论
export let fkhfdata = () => {
    return instance({
        url: "/api/fkhfdata",
        method: "get",
    })
}
// 发布公告
export let addgao = (data: any) => {
    return instance({
        url: "/api/addgong",
        method: "post",
        data
    })
}
// 发布公告
export let upgao = (data: any) => {
    return instance({
        url: "/api/upgong",
        method: "post",
        data
    })
}
// 获取公告
export let gaodata = () => {
    return instance({
        url: "/api/gaodata",
        method: "get",
    })
}